<?php
/**
 * Description...
 *
 * @api Product
 * @author {author}<example@youjiangliao.com>
 * @copyright 2022 You!
 * @version 1.0.0
 */

namespace Project\Product\Controllers;

use Project\Admin\Controllers\BaseController;

class IndexController extends BaseController
{
    /**
     * @api {GET} /api/product/index 数据列表
     * 
     * @apiDescription ...
     * 
     * @apiName  index
     * @apiGroup Product/Index
     * 
     * @apiParam {mixed} params ...
     * 
     * @apiSuccessExample {JSON} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "status_code": 200,
     *          "data" : []
     *     }
     */
    public function index() {
        // 获取数据列表
        $data = \Project\Product\Models\ProductBase::get();
        return $this->success($data);
    }

    /**
     * @api {GET} /api/product/index/{id} 数据详情
     * 
     * @apiDescription ...
     * 
     * @apiName  show
     * @apiGroup Product/Index
     * 
     * @apiParam {mixed} params ...
     * 
     * @apiSuccessExample {JSON} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "status_code": 200,
     *          "data" : []
     *     }
     */
    public function show($id) {

    }

    /**
     * @api {POST} /api/product/index 新增数据
     * 
     * @apiDescription ...
     * 
     * @apiName  store
     * @apiGroup Product/Index
     * 
     * @apiParam {mixed} params ...
     * 
     * @apiSuccessExample {JSON} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "status_code": 200,
     *          "data" : []
     *     }
     */
    public function store() {

    }

    /**
     * @api {PUT} /api/product/index/{id} 更新数据
     * 
     * @apiDescription ...
     * 
     * @apiName  update
     * @apiGroup Product/Index
     * 
     * @apiParam {Integer} id 数据 ID
     * 
     * @apiSuccessExample {JSON} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "status_code": 200,
     *          "data" : []
     *     }
     */
    public function update($id) {

    }

    /**
     * @api {DELETE} /api/product/index/{id} 删除数据
     * 
     * @apiDescription ...
     * 
     * @apiName  destroy
     * @apiGroup Product/Index
     * 
     * @apiParam {Integer} id 数据 ID
     * 
     * @apiSuccessExample {JSON} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "status_code": 200,
     *          "data" : []
     *     }
     */
    public function destroy($id) {

    }

    /**
     * @api {GET} /api/product/index 创建数据页面
     * 
     * @apiDescription ...
     * 
     * @apiName  create
     * @apiGroup Product/Index
     * 
     * @apiParam {mixed} params ...
     * 
     * @apiSuccessExample {JSON} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "status_code": 200,
     *          "data" : []
     *     }
     */
    public function create() {

    }

    /**
     * @api {GET} /api/product/index/{id} 修改数据页面
     * 
     * @apiDescription ...
     * 
     * @apiName  edit
     * @apiGroup Product/Index
     * 
     * @apiParam {Integer} id 数据 ID
     * 
     * @apiSuccessExample {JSON} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "status_code": 200,
     *          "data" : []
     *     }
     */
    public function edit($id) {

    }

}